﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GUI
{
	public partial class Desinger : Form
	{
		Config myConfigWindow;
		PieceBuilder myPieceBuilderWindow;

		public Desinger()
		{
			InitializeComponent();

		}

		private void Desinger_FormClosed(object sender, FormClosedEventArgs e)
		{
			beforeClose();
		}

		private void beforeClose()
		{
			Owner.Show();
		}

		private void configurationToolStripMenuItem1_Click(object sender, EventArgs e)
		{
			myConfigWindow = new Config();
			myConfigWindow.ShowDialog(this);
		}

		private void configurationToolStripMenuItem_Click(object sender, EventArgs e)
		{
			myPieceBuilderWindow = new PieceBuilder();
			myPieceBuilderWindow.ShowDialog(this);
		}

		private void numericUpDown1_ValueChanged(object sender, EventArgs e)
		{
			int tmp = (int)this.numericUpDown1.Value;
            gameBoard.ChangeBoardSize(tmp, tmp);
		}
	}
}
